package com.fyt.reachgo.test;

public class ChartFactory {
    public static Chart createChart(String type)
    {
        if (type.equalsIgnoreCase("histogram"))
        {
            return new HistogramChart(100, "red");
        }
        else if (type.equalsIgnoreCase("line"))
        {
            return new LineChart("green", 100);
        }
        else if (type.equalsIgnoreCase("pie"))
        {
            return new PieChart("blue", 100);
        }
        else
        {
            return null;
        }
    }
}
